package xyz.weblade.beans.factory.config;

import xyz.weblade.beans.factory.HierarchicalBeanFactory;
import xyz.weblade.core.convert.ConversionService;
import xyz.weblade.util.StringValueResolver;

/**
 * 是一个可获取BeanPostProcessor,BeanClassLoader等方法的配置化接口
 */
public interface ConfigurableBeanFactory extends HierarchicalBeanFactory,SingletonBeanRegistry {
    String SCOPE_SINGLETON = "singleton";

    String SCOPE_PROTOTYPE = "prototype";

    /**
     *添加Bean增强器
     */
    void addBeanPostProcessor(BeanPostProcessor beanPostProcessor);

    /**
     * 销毁单例对象
     */
    void destroySingletons();

    /**
     *添加翻译解析器
     */
    void addEmbeddedValueResolver(StringValueResolver valueResolver);

    /**
     * 处理翻译值
     */
    String resolveEmbeddedValue(String value);


    void setConversionService(ConversionService conversionService);

    ConversionService getConversionService();
}
